Browse Source

1.修复物料删除后,导出出错;
2.修复虚拟键盘没有空格;
3.优化客户提出新增和修改物料时Type可以重复使用

liuxinglong 7 years ago
parent
commit
84891862e9

+ 7 - 7
.idea/sonarlint/issuestore/1/2/126c795aaaa4514a9310a384c977b33ca2921ad8

@@ -1,12 +1,12 @@
 
-Msquid:S1066U"/Merge this if statement with the enclosing one.(öóáý8Œ×�¸Ã,
-˜squid:S1186_"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.(Ú¿û¤
-Tsquid:S2696V"6Make the enclosing method "static" or remove this set.(ö™ý¿8Šô‡¸Ã,
 Fsquid:S1444-"*Make this "public static flag" field final(ÕȾëüÿÿÿÿ
-Ksquid:S1066T"/Merge this if statement with the enclosing one.(Á݆çýÿÿÿÿ
-Isquid:S1444/"2Make this "public static waringStatus" field final(Á‡Š’
+Msquid:S1066U"/Merge this if statement with the enclosing one.(öóáý8Œ×�¸Ã,
 gsquid:CommentedOutCodeLineD"<This block of commented-out lines of code should be removed.(èúµÈûÿÿÿÿ
+ƒ"squid:ClassVariableVisibilityCheck-"PMake flag a static final constant or non-public and provide accessors if needed.(ÕȾëüÿÿÿÿ
+Tsquid:S2696V"6Make the enclosing method "static" or remove this set.(ö™ý¿8Šô‡¸Ã,
 Ssquid:S23877"7"queryRunner" is the name of a field in "MinaAbstract".(‘í„Øøÿÿÿÿ
+Isquid:S1444/"2Make this "public static waringStatus" field final(Á‡Š’
+4squid:S2386/"Make this member "protected".(Á‡Š’
+Ksquid:S1066T"/Merge this if statement with the enclosing one.(Á݆çýÿÿÿÿ
 †"squid:ClassVariableVisibilityCheck/"XMake waringStatus a static final constant or non-public and provide accessors if needed.(Á‡Š’
-ƒ"squid:ClassVariableVisibilityCheck-"PMake flag a static final constant or non-public and provide accessors if needed.(ÕȾëüÿÿÿÿ
-4squid:S2386/"Make this member "protected".(Á‡Š’
+˜squid:S1186_"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.(Ú¿û¤

+ 5 - 5
.idea/sonarlint/issuestore/9/c/9c52b7c0ee59d7f181874ad5e513b52af041e83b

@@ -1,8 +1,8 @@
 
-Ysquid:S2696h"6Make the enclosing method "static" or remove this set.(êëÖ¼ýÿÿÿÿ8ŠÝå×¼,
-Zsquid:S2696¿"6Make the enclosing method "static" or remove this set.(¨óÌÂúÿÿÿÿ8ŠÝå×¼,
 Ysquid:S2696x"6Make the enclosing method "static" or remove this set.(¨óÌÂúÿÿÿÿ8ŠÝå×¼,
-Tsquid:S2696O"6Make the enclosing method "static" or remove this set.(ÜÈè«8ŠÝå×¼,
-Gsquid:S1148“"#Use a logger to log this exception.(€ÉÔ…ýÿÿÿÿ8ŠÝå×¼,
 �"squid:ClassVariableVisibilityCheck""UMake validData a static final constant or non-public and provide accessors if needed.(àö¨Šþÿÿÿÿ8Çך¸Ã,
-Tsquid:S2696T"6Make the enclosing method "static" or remove this set.(dz¾À8ŠÝå×¼,
+Ysquid:S2696h"6Make the enclosing method "static" or remove this set.(êëÖ¼ýÿÿÿÿ8ŠÝå×¼,
+Gsquid:S1148“"#Use a logger to log this exception.(€ÉÔ…ýÿÿÿÿ8ŠÝå×¼,
+Tsquid:S2696T"6Make the enclosing method "static" or remove this set.(dz¾À8ŠÝå×¼,
+Zsquid:S2696¿"6Make the enclosing method "static" or remove this set.(¨óÌÂúÿÿÿÿ8ŠÝå×¼,
+Tsquid:S2696O"6Make the enclosing method "static" or remove this set.(ÜÈè«8ŠÝå×¼,

+ 1 - 1
.idea/sonarlint/issuestore/b/0/b0fac8d6d7ead4e1c98dd97f3a289f028cd34032

@@ -1,5 +1,5 @@
 
+gsquid:CommentedOutCodeLineA"<This block of commented-out lines of code should be removed.(¦Ž®éûÿÿÿÿ
 hsquid:UselessImportCheck"=Remove this unused import 'co.dc.commons.utils.DateTimeUtil'.(úµ×À8Àîæ·Ã,
 nsquid:S001174"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(„Ííœûÿÿÿÿ
-gsquid:CommentedOutCodeLineA"<This block of commented-out lines of code should be removed.(¦Ž®éûÿÿÿÿ
 Ksquid:S1068"/Remove this unused "billService" private field.(ªŠŽ•ùÿÿÿÿ

+ 44 - 44
.idea/sonarlint/issuestore/c/3/c31119428485a35a1366fae41e8bb396a9f1bfa9

@@ -1,57 +1,57 @@
 
-ssquid:S1450X"URemove the "timer2" field and declare it as a local variable in the relevant methods.(ôÙªö8Ú�ùÁ¾,
-nsquid:S00100˜"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(î篗8¾ôÈÁÂ,
-Gsquid:S1125ÿ"(Remove the literal "true" boolean value.(¾š¶¯8ÖôÂÓÂ,
+}squid:S00116O"YRename this field "label_content1" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(Ïé•›øÿÿÿÿ8†ÌÝ×¼,
+wsquid:S00116I"XRename this field "CellsVector_1" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(¤Ò½ 8†ÌÝ×¼,
+vsquid:S00117›"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ᶆÄýÿÿÿÿ8†ÌÝ×¼,
 ˆsquid:S1149J"eReplace the synchronized class "Vector" by an unsynchronized one such as "ArrayList" or "LinkedList".(»¿ƒ³ÿÿÿÿÿ8†ÌÝ×¼,
-jsquid:CommentedOutCodeLine£"<This block of commented-out lines of code should be removed.(ñ­Ø’8Œ�­ÔÂ,
-tsquid:S00116L"PRename this field "jsp_1" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ÇÕä¿ÿÿÿÿÿ8†ÌÝ×¼,
-tsquid:S00116/"URename this field "comboBox_1" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ƒîÛø8†ÌÝ×¼,
-„squid:S1149®"eReplace the synchronized class "Vector" by an unsynchronized one such as "ArrayList" or "LinkedList".(íÒ«�8¾ôÈÁÂ,
-Zsquid:S2696™"6Make the enclosing method "static" or remove this set.(êëÖ¼ýÿÿÿÿ8†ÌÝ×¼,
-ssquid:S1450W"URemove the "timer1" field and declare it as a local variable in the relevant methods.(Ë­´à8†ÌÝ×¼,
-”"squid:ClassVariableVisibilityCheckf"ZMake billDetailPojo a static final constant or non-public and provide accessors if needed.(κËõüÿÿÿÿ8†ÌÝ×¼,
-Qsquid:S1068b"4Remove this unused "nowMaterielPojo2" private field.(§¼Š8†ÌÝ×¼,
+qsquid:S00116V"RRename this field "label_4" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(¢†£Ÿ8†ÌÝ×¼,
 „squid:S1192è"eDefine a constant instead of duplicating this literal "/co/dc/aptiv/img/start-btn-hover.png" 4 times.(¡ð“Ë8ùÁ¨£¾,
+jsquid:CommentedOutCodeLineå"<This block of commented-out lines of code should be removed.(åßø8èýÔÂ,
+Usquid:S2696Ü"6Make the enclosing method "static" or remove this set.(È–Ò¢8ùÁ¨£¾,
+jsquid:UselessImportCheck"@Remove this unused import 'javax.swing.table.TableCellRenderer'.(É¡“8ŸÊ¸Ÿ¾,
 Usquid:S2696•"6Make the enclosing method "static" or remove this set.(´³îÔ8¾ôÈÁÂ,
+usquid:S3776l"RRefactor this method to reduce its Cognitive Complexity from 34 to the 15 allowed.(¢þ­�þÿÿÿÿ8†ÌÝ×¼,
+xsquid:S00116Q"YRename this field "label_content3" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ÂçñÃ8†ÌÝ×¼,
+”"squid:ClassVariableVisibilityCheckf"ZMake billDetailPojo a static final constant or non-public and provide accessors if needed.(κËõüÿÿÿÿ8†ÌÝ×¼,
+Usquid:S2696š"6Make the enclosing method "static" or remove this set.(èôÄÀ8¾ôÈÁÂ,
+ƒsquid:S1149I"eReplace the synchronized class "Vector" by an unsynchronized one such as "ArrayList" or "LinkedList".(¤Ò½ 8†ÌÝ×¼,
+tsquid:S00116L"PRename this field "jsp_1" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ÇÕä¿ÿÿÿÿÿ8†ÌÝ×¼,
+‘"squid:ClassVariableVisibilityCheckR"WMake label_scan1 a static final constant or non-public and provide accessors if needed.(÷ùÚøýÿÿÿÿ8†ÌÝ×¼,
+ssquid:S1450X"URemove the "timer2" field and declare it as a local variable in the relevant methods.(ôÙªö8Ú�ùÁ¾,
+isquid:UnusedPrivateMethod�"7Remove this unused private "createNewScanFrame" method.(€°óƒýÿÿÿÿ8¾ôÈÁÂ,
+Œ"squid:ClassVariableVisibilityCheckS"WMake label_scan2 a static final constant or non-public and provide accessors if needed.(ãÂçË8†ÌÝ×¼,
+xsquid:S00116P"YRename this field "label_content2" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(€»é¡8†ÌÝ×¼,
+|squid:S00116J"XRename this field "TitleVector_1" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(»¿ƒ³ÿÿÿÿÿ8†ÌÝ×¼,
+isquid:CommentedOutCodeLineé"<This block of commented-out lines of code should be removed.(¨Âí$8ùÁ¨£¾,
+Gsquid:S1148©"#Use a logger to log this exception.(€ÉÔ…ýÿÿÿÿ8¾ôÈÁÂ,
 zsquid:S00116R"VRename this field "label_scan1" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(÷ùÚøýÿÿÿÿ8†ÌÝ×¼,
-Usquid:S2696Ü"6Make the enclosing method "static" or remove this set.(È–Ò¢8ùÁ¨£¾,
+nsquid:S00116K"ORename this field "jt_1" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ö�¦Ò8†ÌÝ×¼,
+‹"squid:ClassVariableVisibilityCheck/"VMake comboBox_1 a static final constant or non-public and provide accessors if needed.(ƒîÛø8Ê·²¬Â,
+Usquid:S2696ÿ"6Make the enclosing method "static" or remove this set.(¾š¶¯8¾ôÈÁÂ,
+asquid:UselessImportCheck"6Remove this unused import 'co.dc.aptiv.pojo.BillPojo'.(à·Þ£8õà¶Ÿ¾,
+Zsquid:S2696Þ"6Make the enclosing method "static" or remove this set.(Å�Ž«ÿÿÿÿÿ8ùÁ¨£¾,
+Qsquid:S1068b"4Remove this unused "nowMaterielPojo2" private field.(§¼Š8†ÌÝ×¼,
+Zsquid:S2696�"6Make the enclosing method "static" or remove this set.(»¶¶ˆúÿÿÿÿ8¾ôÈÁÂ,
 �"squid:ClassVariableVisibilityCheck?"UMake frameType a static final constant or non-public and provide accessors if needed.(¼“á¬ùÿÿÿÿ8†ÌÝ×¼,
-vsquid:S00117›"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ᶆÄýÿÿÿÿ8†ÌÝ×¼,
+jsquid:CommentedOutCodeLine£"<This block of commented-out lines of code should be removed.(ñ­Ø’8Œ�­ÔÂ,
+Lsquid:S1948a"/Make "materielPojos" transient or serializable.(÷ùÈ8†ÌÝ×¼,
+usquid:S00116S"VRename this field "label_scan2" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ãÂçË8†ÌÝ×¼,
+tsquid:S00116/"URename this field "comboBox_1" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ƒîÛø8†ÌÝ×¼,
+Zsquid:S2696˜"6Make the enclosing method "static" or remove this set.(¨óÌÂúÿÿÿÿ8†ÌÝ×¼,
+Gsquid:S1125ÿ"(Remove the literal "true" boolean value.(¾š¶¯8ÖôÂÓÂ,
+‘"squid:ClassVariableVisibilityCheckT"WMake label_scan3 a static final constant or non-public and provide accessors if needed.(¦Œ÷Ïøÿÿÿÿ8†ÌÝ×¼,
+nsquid:S00100˜"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(î篗8¾ôÈÁÂ,
+Gsquid:S1185Œ"(Remove this method to simply inherit it.(ÈÊ“À8ùÁ¨£¾,
+Zsquid:S2696ù"6Make the enclosing method "static" or remove this set.(ö‹â·ýÿÿÿÿ8¾ôÈÁÂ,
 vsquid:S00117¥"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(�™Å’úÿÿÿÿ8ùÁ¨£¾,
-qsquid:S00116V"RRename this field "label_4" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(¢†£Ÿ8†ÌÝ×¼,
-Gsquid:S1148©"#Use a logger to log this exception.(€ÉÔ…ýÿÿÿÿ8¾ôÈÁÂ,
 tsquid:S00116N"VRename this field "panel_style" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(Ú“ÿ\8†ÌÝ×¼,
-Zsquid:S2696�"6Make the enclosing method "static" or remove this set.(»¶¶ˆúÿÿÿÿ8¾ôÈÁÂ,
-Œ"squid:ClassVariableVisibilityCheckS"WMake label_scan2 a static final constant or non-public and provide accessors if needed.(ãÂçË8†ÌÝ×¼,
-asquid:UselessImportCheck"6Remove this unused import 'co.dc.aptiv.pojo.BillPojo'.(à·Þ£8õà¶Ÿ¾,
-Lsquid:S1948a"/Make "materielPojos" transient or serializable.(÷ùÈ8†ÌÝ×¼,
-|squid:S00116J"XRename this field "TitleVector_1" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(»¿ƒ³ÿÿÿÿÿ8†ÌÝ×¼,
-‘"squid:ClassVariableVisibilityCheckR"WMake label_scan1 a static final constant or non-public and provide accessors if needed.(÷ùÚøýÿÿÿÿ8†ÌÝ×¼,
-xsquid:S00116P"YRename this field "label_content2" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(€»é¡8†ÌÝ×¼,
-bsquid:S1155¼">Use isEmpty() to check whether the collection is empty or not.(„ñÛ¯þÿÿÿÿ8ùÁ¨£¾,
-}squid:S00116O"YRename this field "label_content1" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(Ïé•›øÿÿÿÿ8†ÌÝ×¼,
+vsquid:S00116U"RRename this field "label_3" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ƾ€õùÿÿÿÿ8†ÌÝ×¼,
 Gsquid:S1148§"#Use a logger to log this exception.(€ÉÔ…ýÿÿÿÿ8¾ôÈÁÂ,
-isquid:CommentedOutCodeLineé"<This block of commented-out lines of code should be removed.(¨Âí$8ùÁ¨£¾,
+qsquid:MaximumInheritanceDepth$"<This class has 6 parents which is greater than 5 authorized.(ˆ˜ë¶ÿÿÿÿÿ8†ÌÝ×¼,
 gsquid:S1192Ø"HDefine a constant instead of duplicating this literal "</html>" 6 times.(Ó¸ˆ³8¾ôÈÁÂ,
+bsquid:S1155¼">Use isEmpty() to check whether the collection is empty or not.(„ñÛ¯þÿÿÿÿ8ùÁ¨£¾,
 zsquid:S00116T"VRename this field "label_scan3" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(¦Œ÷Ïøÿÿÿÿ8†ÌÝ×¼,
-xsquid:S00116Q"YRename this field "label_content3" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ÂçñÃ8†ÌÝ×¼,
-vsquid:S00116U"RRename this field "label_3" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ƾ€õùÿÿÿÿ8†ÌÝ×¼,
+Zsquid:S2696™"6Make the enclosing method "static" or remove this set.(êëÖ¼ýÿÿÿÿ8†ÌÝ×¼,
 vsquid:S00117Ï"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(””؇ÿÿÿÿÿ8ùÁ¨£¾,
+„squid:S1149®"eReplace the synchronized class "Vector" by an unsynchronized one such as "ArrayList" or "LinkedList".(íÒ«�8¾ôÈÁÂ,
 Œ"squid:ClassVariableVisibilityCheckj"RMake onLine a static final constant or non-public and provide accessors if needed.(öµ§Üúÿÿÿÿ8†ÌÝ×¼,
-ƒsquid:S1149I"eReplace the synchronized class "Vector" by an unsynchronized one such as "ArrayList" or "LinkedList".(¤Ò½ 8†ÌÝ×¼,
-Zsquid:S2696˜"6Make the enclosing method "static" or remove this set.(¨óÌÂúÿÿÿÿ8†ÌÝ×¼,
-Zsquid:S2696Þ"6Make the enclosing method "static" or remove this set.(Å�Ž«ÿÿÿÿÿ8ùÁ¨£¾,
-jsquid:CommentedOutCodeLineå"<This block of commented-out lines of code should be removed.(åßø8èýÔÂ,
-nsquid:S00116K"ORename this field "jt_1" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ö�¦Ò8†ÌÝ×¼,
-Gsquid:S1185Œ"(Remove this method to simply inherit it.(ÈÊ“À8ùÁ¨£¾,
-jsquid:UselessImportCheck"@Remove this unused import 'javax.swing.table.TableCellRenderer'.(É¡“8ŸÊ¸Ÿ¾,
-usquid:S3776l"RRefactor this method to reduce its Cognitive Complexity from 34 to the 15 allowed.(¢þ­�þÿÿÿÿ8†ÌÝ×¼,
-usquid:S00116S"VRename this field "label_scan2" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ãÂçË8†ÌÝ×¼,
-Zsquid:S2696ù"6Make the enclosing method "static" or remove this set.(ö‹â·ýÿÿÿÿ8¾ôÈÁÂ,
-‹"squid:ClassVariableVisibilityCheck/"VMake comboBox_1 a static final constant or non-public and provide accessors if needed.(ƒîÛø8Ê·²¬Â,
-‘"squid:ClassVariableVisibilityCheckT"WMake label_scan3 a static final constant or non-public and provide accessors if needed.(¦Œ÷Ïøÿÿÿÿ8†ÌÝ×¼,
-qsquid:MaximumInheritanceDepth$"<This class has 6 parents which is greater than 5 authorized.(ˆ˜ë¶ÿÿÿÿÿ8†ÌÝ×¼,
-Usquid:S2696š"6Make the enclosing method "static" or remove this set.(èôÄÀ8¾ôÈÁÂ,
-isquid:UnusedPrivateMethod�"7Remove this unused private "createNewScanFrame" method.(€°óƒýÿÿÿÿ8¾ôÈÁÂ,
-Usquid:S2696ÿ"6Make the enclosing method "static" or remove this set.(¾š¶¯8¾ôÈÁÂ,
-wsquid:S00116I"XRename this field "CellsVector_1" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(¤Ò½ 8†ÌÝ×¼,
+ssquid:S1450W"URemove the "timer1" field and declare it as a local variable in the relevant methods.(Ë­´à8†ÌÝ×¼,

+ 14 - 14
src/main/java/co/dc/aptiv/MaterielFrame.java

@@ -291,7 +291,7 @@ public class MaterielFrame extends JFrame {
         //单选
         jt.setSelectionMode(SINGLE_SELECTION);
         //充满
-        jt.setFillsViewportHeight(true);
+//        jt.setFillsViewportHeight(true);
         /*
          * 行设置
          */
@@ -412,16 +412,16 @@ public class MaterielFrame extends JFrame {
                     int cpni = AptivApp.materielService.isExistByParam("cpn", cpnVal, 10, 0);
                     int typei = AptivApp.materielService.isExistByParam("type", typeVal, 2, 0);
                     if (dpni == 1) {
-                        JOptionPane.showMessageDialog(MaterielFrame.this, "DPN已存在,请新填写DPN", "提示", JOptionPane.ERROR_MESSAGE);
+                        JOptionPane.showMessageDialog(MaterielFrame.this, "DPN已存在,请新填写DPN", "提示", JOptionPane.ERROR_MESSAGE);
                     } else if (dpni == 2) {
                         JOptionPane.showMessageDialog(MaterielFrame.this, "DPN的位数不等于8位", "提示", JOptionPane.ERROR_MESSAGE);
                     } else if (cpni == 1) {
-                        JOptionPane.showMessageDialog(MaterielFrame.this, "CPN已存在,请新填写CPN", "提示", JOptionPane.ERROR_MESSAGE);
+                        JOptionPane.showMessageDialog(MaterielFrame.this, "CPN已存在,请新填写CPN", "提示", JOptionPane.ERROR_MESSAGE);
                     } else if (cpni == 2) {
                         JOptionPane.showMessageDialog(MaterielFrame.this, "CPN的位数不等于10位", "提示", JOptionPane.ERROR_MESSAGE);
-                    } else if (typei == 1) {
-                        JOptionPane.showMessageDialog(MaterielFrame.this, "TYPE已存在,请新填写TYPE", "提示", JOptionPane.ERROR_MESSAGE);
-                    } else if (typei == 2) {
+                    } /*else if (typei == 1) {
+                        JOptionPane.showMessageDialog(MaterielFrame.this, "TYPE已存在,请新填写TYPE", "提示", JOptionPane.ERROR_MESSAGE);
+                    } */ else if (typeVal.length() != 2) {
                         JOptionPane.showMessageDialog(MaterielFrame.this, "TYPE的位数超过2位", "提示", JOptionPane.ERROR_MESSAGE);
                     } else {
                         flag = true;
@@ -429,7 +429,7 @@ public class MaterielFrame extends JFrame {
                         myAddMateriel = null;
                     }
                 } else {
-                    JOptionPane.showMessageDialog(MaterielFrame.this, "请填写完整.", "提示", JOptionPane.ERROR_MESSAGE);
+                    JOptionPane.showMessageDialog(MaterielFrame.this, "请将物料信息填写完整.", "提示", JOptionPane.ERROR_MESSAGE);
                 }
             } else {
                 dispose();
@@ -533,24 +533,24 @@ public class MaterielFrame extends JFrame {
                     int cpni = AptivApp.materielService.isExistByParam("cpn", cpnVal, 10, materiel.getId());
                     int typei = AptivApp.materielService.isExistByParam("type", typeVal, 2, materiel.getId());
                     if (dpni == 1) {
-                        JOptionPane.showMessageDialog(MaterielFrame.this, "DPN已存在,请新填写DPN", "提示", JOptionPane.ERROR_MESSAGE);
+                        JOptionPane.showMessageDialog(MaterielFrame.this, "DPN已存在,请新填写DPN", "提示", JOptionPane.ERROR_MESSAGE);
                     } else if (dpni == 2) {
                         JOptionPane.showMessageDialog(MaterielFrame.this, "DPN的位数不等于8位", "提示", JOptionPane.ERROR_MESSAGE);
                     } else if (cpni == 1) {
-                        JOptionPane.showMessageDialog(MaterielFrame.this, "CPN已存在,请新填写CPN", "提示", JOptionPane.ERROR_MESSAGE);
+                        JOptionPane.showMessageDialog(MaterielFrame.this, "CPN已存在,请新填写CPN", "提示", JOptionPane.ERROR_MESSAGE);
                     } else if (cpni == 2) {
                         JOptionPane.showMessageDialog(MaterielFrame.this, "CPN的位数不等于10位", "提示", JOptionPane.ERROR_MESSAGE);
-                    } else if (typei == 1) {
-                        JOptionPane.showMessageDialog(MaterielFrame.this, "TYPE已存在,请新填写TYPE", "提示", JOptionPane.ERROR_MESSAGE);
-                    } else if (typei == 2) {
-                        JOptionPane.showMessageDialog(MaterielFrame.this, "TYPE的位数超过2位", "提示", JOptionPane.ERROR_MESSAGE);
+                    } /*else if (typei == 1) {
+                        JOptionPane.showMessageDialog(MaterielFrame.this, "TYPE已存在,请新填写TYPE", "提示", JOptionPane.ERROR_MESSAGE);
+                    } */ else if (typeVal.length() != 2) {
+                        JOptionPane.showMessageDialog(MaterielFrame.this, "TYPE的位数不等于2位", "提示", JOptionPane.ERROR_MESSAGE);
                     } else {
                         flag = true;
                         dispose();
                         myUpdateMateriel = null;
                     }
                 } else {
-                    JOptionPane.showMessageDialog(MaterielFrame.this, "请填写完整.", "提示", JOptionPane.ERROR_MESSAGE);
+                    JOptionPane.showMessageDialog(MaterielFrame.this, "请将物料信息填写完整.", "提示", JOptionPane.ERROR_MESSAGE);
                 }
             } else {
                 dispose();

+ 2 - 1
src/main/java/co/dc/aptiv/service/BillDetailService.java

@@ -164,7 +164,8 @@ public class BillDetailService extends BaseDao<BillDetailPojo> {
                 Map<String, Object> map = new HashMap<String, Object>(8);
                 map.put("index", index);
                 map.put("billCode", billPojo.getBillCode());
-                map.put("dpn", materielMap.get(billDetailPojos.get(j).getMaterielId()).getDpn());
+                MaterielPojo materielPojo = materielMap.get(billDetailPojos.get(j).getMaterielId());
+                map.put("dpn", materielPojo != null ? materielPojo.getDpn() : "物料已删除");
                 map.put("qrCode", billDetailPojos.get(j).getQrCode());
                 map.put("collectionCode", billDetailPojos.get(j).getCollectionCode());
                 map.put("state", billDetailPojos.get(j).getState() == 1 ? "合格" : "不合格");

+ 2 - 3
src/main/java/co/dc/aptiv/service/MaterielService.java

@@ -192,10 +192,9 @@ public class MaterielService {
      * @return
      */
     public int isExistByParam(String paramName, String paramValue, int MaxLength, long id) {
-        MaterielPojo materielPojo = baseDao.findByParam(MaterielPojo.class, paramName.trim(), paramValue.trim());
-        String sql = "select * from materiel where " + paramName + " = '" + paramValue + "'";
+        String sql = "SELECT * FROM materiel WHERE delFlag = 0 AND " + paramName + " = '" + paramValue + "'";
         if (id > 0) {
-            sql += " and id != " + id;
+            sql += " AND id != " + id;
         }
         try {
             List<MaterielPojo> materielPojos = baseDao.query(sql, new BeanListHandler<MaterielPojo>(MaterielPojo.class));

+ 9 - 1
src/main/java/co/dc/aptiv/utils/KeyboardUtil.java

@@ -192,6 +192,7 @@ public class KeyboardUtil extends JPanel {
         JButton button_8 = new JButton("8");
         JButton button_9 = new JButton("9");
         JButton button_0 = new JButton("0");
+        JButton button_space = new JButton("空格");
         JButton button_clear = new JButton(flag ? "大写关" : "大写开");
         JButton button_a = new JButton(flag ? "a" : "A");
         JButton button_b = new JButton(flag ? "b" : "B");
@@ -254,7 +255,9 @@ public class KeyboardUtil extends JPanel {
             button_9.addActionListener(this);
             button_0.setBounds(340, 56, 85, 56);
             button_0.addActionListener(this);
-            button_clear.setBounds(430, 56, 170, 56);
+            button_space.setBounds(430, 56, 85, 56);
+            button_space.addActionListener(this);
+            button_clear.setBounds(515, 56, 85, 56);
             button_clear.addActionListener(this);
             button_a.setBounds(0, 116, 85, 56);
             button_a.addActionListener(this);
@@ -323,6 +326,7 @@ public class KeyboardUtil extends JPanel {
             add(button_8);
             add(button_9);
             add(button_0);
+            add(button_space);
             add(button_clear);
             add(button_a);
             add(button_b);
@@ -388,11 +392,15 @@ public class KeyboardUtil extends JPanel {
             if (e.getSource() == button_0) {
                 uploadData("0");
             }
+            if (e.getSource() == button_space) {
+                uploadData(" ");
+            }
             if (e.getSource() == button_clear) {
                 /*clearData();*/
                 flag = flag ? false : true;
                 daxiaoxie();
             }
+
             if (e.getSource() == button_a) {
                 uploadData(flag ? "a" : "A");
             }

+ 3 - 3
src/main/resources/config.properties

@@ -8,15 +8,15 @@ dataSource.password=
 lastname=admin
 
 #PLC
-plc.ip=192.168.43.59
+plc.ip=192.168.2.2
 plc.port=3000
 
 #\u6FC0\u5149\u673A\u914D\u7F6E
-com=COM1
+com=COM2
 bot=9600
 
 #\u91C7\u96C6\u5668\u914D\u7F6E
-machine.ip=192.168.43.59
+machine.ip=192.168.2.2
 machine.port=51236
 
 #\u8054\u673A\u72B6\u6001